<template>
  <div class="list">
    <div class="top">
      <slot name="tit"></slot>
      <!-- <p>生鲜</p> -->
      <p class="bb">
        更多
        <span class="iconfont icon-youjiantou"></span>
      </p>
    </div>
    <img :src="bann" alt="" class="pic1" />
    <div class="bottom">
      <div class="pic" v-for="(v, i) in pics" :key="i" @click="xq(v.id)">
        <router-link to="/xiangqing">
          <img :src="v.img" alt="" />
          <p>{{ v.title }}</p>
          <span>￥{{ v.price }}</span>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["bann", "pics"],
  methods: {
    xq(ids) {
      // console.log("我是id", id);
      this.$router.push({ name: "xiangqing", params: { id: ids } });
    },
  },
};
</script>

<style scoped>
@import url(../../assets/life/iconfont.css);
.list {
  width: 95%;
  min-height: 3rem;
  background-color: #ef5757;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0.08rem;
  padding-bottom: 0.07rem;
  margin-top: 0.15rem;
}
.top {
  height: 0.3rem;
  width: 94%;
  margin-top: 0.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.list .pic1 {
  width: 97%;
  height: 80px;
  border-radius: 0.08rem;
}
.bb {
  font-size: 0.13rem;
}
.bottom {
  display: flex;
  width: 100%;
  /* justify-content: space-around; */
  flex-wrap: wrap;
}
.bottom img {
  height: 1.23rem;
  width: 1.23rem;
  flex-shrink: 0;
}
.pic {
  width: 31%;
  height: 1.8rem;
  background-color: #fff;
  margin-left: 0.06rem;
  margin-top: 0.08rem;
  border-radius: 0.03rem;
  font-size: 0.12rem;
}
.pic p {
  margin-left: 0.03rem;
}
.pic span {
  color: #c03131;
  font-size: 0.14rem;
}
.pic img {
  height: 1.23rem;
  width: 1.1rem;
}
</style>